<template>
    <div :id="id" :style="{width,height}"></div>
</template>

<script>
import echarts from "echarts"
export default {
  props:['width','height','id'],
  mounted(){
    const myChart = echarts.init(document.getElementById(this.id));
    // 绘制图表
    myChart.setOption({
        tooltip: {},
        xAxis: {
            data: ['新增用户', '新帖子', '新增投诉', '新增会员','其他']
        },
        yAxis: {},
        series: [{
            name: '报告',
            type: 'bar',
            data: [3999,456,788, 2000,1789]
        }]
    });
  }
}
</script>

<style>

</style>